﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;

namespace orb
{
    static class Program
    {
        static Server server;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var guiRunner = new GuiRunner();
            server = new Server(guiRunner);
            Application.ApplicationExit += Application_ApplicationExit;
            Application.Run(guiRunner);
        }

        static void Application_ApplicationExit(object sender, EventArgs e)
        {
            using (server) { }
        }
    }
}
